package com.ruoyi.module.xmd.controller;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.module.yzx.tool.QrCodeUtils;
import com.ruoyi.system.domain.YhGasCylinders;
import com.ruoyi.system.service.IYhGasCylindersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import static com.ruoyi.module.yzx.controller.YzxGasCylindersController.co;

/**
 * 气瓶信息Controller
 * 
 * @author ruoyi
 * @date 2022-11-07
 */
@RestController
@RequestMapping("/xmd/cylinders")
public class XmdGasCylindersController extends BaseController
{
    @Autowired
    private IYhGasCylindersService yhGasCylindersService;

    /**
     * 查询气瓶信息列表
     */
    @GetMapping("/list")
    public TableDataInfo list(YhGasCylinders yhGasCylinders)
    {
        startPage();
        List<YhGasCylinders> list = yhGasCylindersService.selectYhGasCylindersList(yhGasCylinders);
        return getDataTable(list);
    }

    /**
     * 获取气瓶信息详细信息
     */
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return AjaxResult.success(yhGasCylindersService.selectYhGasCylindersById(id));
    }


}
